package cn.wen.yinxiu.works.recommend;import lombok.AllArgsConstructor;import lombok.Data;import lombok.NoArgsConstructor;/** * @ClassName: UserWorks * @Author: 小飞 * @Date: 2023/6/8 15:11 * @Description: */@Data@NoArgsConstructor@AllArgsConstructorpublic class UserTopic implements Comparable<UserTopic> {    private Long userId;    private Long topicId;    private double rate;    @Override    public int compareTo(UserTopic o) {        return (int) (o.getRate() - this.getRate());    }}